<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>哈哈</h1>
</body>
<script th:src="@{/jquery/jquery-3.5.1.js}"></script>
<script th:inline="javascript">
    $(function () {
        var url = "${pageContext.request.contextPath}";
        var aaa = [[${#request.getContextPath()}]];
        //var bbb = /*[[@{/}]]*/;
        var ddd = [[${#httpServletRequest.getContextPath()}]];
        console.log(url+"lala");
        console.log(aaa);
        //console.log(bbb);
        console.log(ddd);
    });
</script>
</html>